import { ref } from "vue";
import { defineStore } from "pinia";
import { getNavList } from "@/apis/layout";

export const useCategroyStore = defineStore("categroy", () => {
    
    // state
    const navList = ref([]);

    //action
    const getNav = async () => {
        const res = await getNavList();
        navList.value = res.result;
    };

    return {
        navList,
        getNav
    }
});

